using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.PowerShell.CmdletManagement.CompareCmdlet
{
    public class NamedParameterSet : NonameParameterSet
    {
        private string _name;

        public NamedParameterSet(int parameterSetId, string name) : base(parameterSetId) {
            SetName(name);
        }

        public NamedParameterSet(string name) {
            SetName(name);
        }

        public override string Name {
            get {return _name;}
        }

        public bool HasName(NamedParameterSet namedParameterSet) {
            return _name.Equals(namedParameterSet.Name, StringComparison.OrdinalIgnoreCase);
        }

        public bool HasName(string name) {
            return _name.Equals(name, StringComparison.OrdinalIgnoreCase);
        }

        private void SetName(string name) {
            if(name == null)
                throw new ArgumentNullException("Name is null in NamedParameterSet constructor.");
            _name = name;
        }
    }
}
